package cn.schoolwow.quickdao.module.database.dml.instance.service.update;

import cn.schoolwow.quickdao.module.database.dml.common.flow.CheckReasonInstanceMapFlow;
import cn.schoolwow.quickdao.module.database.dml.instance.flow.common.SetInstanceEntityFlow;
import cn.schoolwow.quickdao.module.database.dml.instance.flow.common.SetInstanceUniqueTypeFlow;
import cn.schoolwow.quickdao.module.database.dml.instance.flow.common.filter.FilterInstanceByConstraintFlow;
import cn.schoolwow.quickdao.module.database.dml.instance.flow.update.service.UpdateInstanceArrayFlow;
import cn.schoolwow.quickflow.QuickFlowExecutor;
import cn.schoolwow.quickflow.flow.CompositeBusinessFlow;

public class UpdateInstanceArrayCompositeBusiness implements CompositeBusinessFlow {
    @Override
    public void executeCompositeBusiness(QuickFlowExecutor quickFlowExecutor) {
        quickFlowExecutor.next(new SetInstanceEntityFlow())
                .next(new SetInstanceUniqueTypeFlow())
                .next(new FilterInstanceByConstraintFlow())
                .next(new CheckReasonInstanceMapFlow())
                .next(new UpdateInstanceArrayFlow());
    }

    @Override
    public String name() {
        return "更新实例数组复合流程";
    }
}
